from google.appengine.ext.webapp import template
from google.appengine.ext import webapp
from google.appengine.ext.webapp.util import run_wsgi_app

class MainPage(webapp.RequestHandler):
    def get(self):
        url = self.request.get('url')
        callback = self.request.get('callback')
        data='{a:1,b:"test"}'
        self.response.headers['Content-Type']='application/javascript'
        self.response.out.write(callback+'('+data+')')
        
application = webapp.WSGIApplication([('/', MainPage)],
                                     debug=True)

def main():
    run_wsgi_app(application)

if __name__ == "__main__":
    main()
